<!--
 * @Author: White
 * @description: 
 * @LastEditTime: 2021-07-12 09:37:31
-->

<template>
  <div id="app">
    <router-view :key="key"/>
  </div>
</template>

<script>

export default {
  name: 'App',
  computed: {
    // 添加key,确保路由切换时都会重新渲染触发钩子
    key() {
      return this.$router.name? this.$router.name + + new Date(): this.$route + + new Date()
    }
  }
}
</script>

<style>
</style>
